﻿using NLog;
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Yywl.Svc.Core;

namespace Yywl.Svc
{
    static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        static void Main()
        {
            //是否调试模式
            string isDebugCmd = ConfigHelper.GetAppConfig("IsDebugCmd");
            if (isDebugCmd == "1")
            {   
                //02、调试，调试时注释01、后台服务代码即可
                new Service1().DoTask_CheckProcessStatus(null);

            }
            else
            {
                //01、后台服务
                ServiceBase[] ServicesToRun;
                ServicesToRun = new ServiceBase[]
                {
                new Service1()
                };
                ServiceBase.Run(ServicesToRun);

            }




        }

    }
}
